﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;

namespace CV_Website.Account
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        private void CreateUser()
        {
            DAL.Account newUser = new DAL.Account() 
            {
                Authority=(AuthorityLevel)1, 
                Email=this.TextBoxUserName.ToString(), 
                Password=this.LabelConfirmPassword.ToString() 
            };

            if (!DAL.AccountDB.AuthenticateRegisterValues(newUser))
                DAL.AccountDB.AddAccount(newUser);                
        }

        
    }
}